home *** CD-ROM | disk | FTP | other *** search
- Path: gail.ripco.com!mambuhl
- From: mambuhl@ripco.com (Martin Ambuhl)
- Newsgroups: comp.lang.c
- Subject: Re: very simple newbie qu
- Date: 4 Mar 1996 09:19:56 GMT
- Organization: Ripco Communications, Inc.
- Message-ID: <4hecjs$p7m@gail.ripco.com>
- NNTP-Posting-Host: foley.ripco.com
-
- Norman Bullen <nbullen@ix.netcom.com> in <3135B987.1DDE@ix.netcom.com>
- wrote of Tanmoy's clearly written and correct exposition of the problem
- with:
-
- >> scanf("%s/n",s);
-
- >What he's trying to say (but doesn't seem to express very well) is that
- >the representation of a "newline" character should have a backward
- slash
- >(the top end pointed left) instead of a forward slash.
-
- This is hardly all Tanmoy succeeded in expressing well. Go back and
- reread his article.
-
- >That's not the real problem, however. scanf is a really poorly conceived
- >function, IMHO. It rules are too complicated and it does not do what most
- >people want it to do. For your situation, as shown in the sample code
- >above, you want to use gets instead of scanf.
-
- Please, get the FAQ from rtfm.mit.edu immediately. If you had already
- done this -- as you _should_ have -- you would know better than to post
- such a "really poorly conceived" suggestion.
-
- --
- * Martin Ambuhl net: mambuhl@ripco.com
- * Chicago, IL (USA)
-